adTempus API
ArcanaDevelopment.adTempus.Shared Namespace / EnumHelpers Class / ParseEnum Method / ParseEnum<T>(String,T) Method


In This Topic
    ParseEnum<T>(String,T) Method
    In This Topic
    Parses an enum value from a string, which may contain either the text or numeric value for the enum.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Function ParseEnum(Of T As {New, Enum, Struct})( _
       ByVal source As String, _
       ByVal defaultValue As T _
    ) As T
    public static T ParseEnum<T>( 
       string source,
       T defaultValue
    )
    where T: new(), Enum, struct
    public:
    static T^ ParseEnumgeneric<typename T>
    ( 
       String^ source,
       T^ defaultValue
    ) 
    where T: gcnew(), Enum, value class

    Parameters

    source
    defaultValue

    Type Parameters

    T
    See Also